From: Keir Fraser Date: Fri, 20 Mar 2009 09:10:55 +0000 (+0000) Subject: vtd: only enable Interrupt Remapping if Queued Invalidation is also enabled. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13992^2~13 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=312b6463fb9c81cb69324409fa5a1e6e5485c19d;p=xen.git vtd: only enable Interrupt Remapping if Queued Invalidation is also enabled. If Queued Invalidation is not supported or not enabled, we should not enable Interrupt Remapping even if HW supports it, because Interrupt Remapping needs Queued Invalidation to invalidate Interrupt Remapping Cache. Signed-off-by: Dexuan Cui --- diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index af58d7dc4d..0e91915fb5 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1782,6 +1782,14 @@ int intel_vtd_setup(void) if ( iommu_intremap && !ecap_intr_remap(iommu->ecap) ) iommu_intremap = 0; } + + if ( !iommu_qinval && iommu_intremap ) + { + iommu_intremap = 0; + gdprintk(XENLOG_WARNING VTDPREFIX, "Interrupt Remapping disabled " + "since Queued Invalidation isn't supported or enabled.\n"); + } + #define P(p,s) printk("Intel VT-d %s %ssupported.\n", s, (p)? "" : "not ") P(iommu_snoop, "Snoop Control"); P(iommu_passthrough, "DMA Passthrough");